package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YxFeedbackMapper;
import com.ruoyi.system.domain.YxFeedback;
import com.ruoyi.system.service.IYxFeedbackService;

/**
 * 意见反馈Service业务层处理
 * 
 * @author lingyu
 * @date 2024-03-15
 */
@Service
public class YxFeedbackServiceImpl implements IYxFeedbackService 
{
    @Autowired
    private YxFeedbackMapper yxFeedbackMapper;

    /**
     * 查询意见反馈
     * 
     * @param id 意见反馈主键
     * @return 意见反馈
     */
    @Override
    public YxFeedback selectYxFeedbackById(Long id)
    {
        return yxFeedbackMapper.selectYxFeedbackById(id);
    }

    /**
     * 查询意见反馈列表
     * 
     * @param yxFeedback 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<YxFeedback> selectYxFeedbackList(YxFeedback yxFeedback)
    {
        return yxFeedbackMapper.selectYxFeedbackList(yxFeedback);
    }

    /**
     * 新增意见反馈
     * 
     * @param yxFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int insertYxFeedback(YxFeedback yxFeedback)
    {
        yxFeedback.setCreateTime(DateUtils.getNowDate());
        return yxFeedbackMapper.insertYxFeedback(yxFeedback);
    }

    /**
     * 修改意见反馈
     * 
     * @param yxFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int updateYxFeedback(YxFeedback yxFeedback)
    {
        return yxFeedbackMapper.updateYxFeedback(yxFeedback);
    }

    /**
     * 批量删除意见反馈
     * 
     * @param ids 需要删除的意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteYxFeedbackByIds(Long[] ids)
    {
        return yxFeedbackMapper.deleteYxFeedbackByIds(ids);
    }

    /**
     * 删除意见反馈信息
     * 
     * @param id 意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteYxFeedbackById(Long id)
    {
        return yxFeedbackMapper.deleteYxFeedbackById(id);
    }
}
